﻿@model WMILK_MVC4.Models.RegisterUserModels
@Styles.Render("~/Content/ProductDetail")
@{
    Layout = "~/Views/Shared/_Layout_NoMenu.cshtml";
}

@using (Html.BeginForm("Register", "User", FormMethod.Post, new { @class = "form-horizontal box-shadows", @style = "width: 100%; margin: auto" }))
{
    @Html.AntiForgeryToken()
    <div style ="padding: 25px 150px 25px 150px">
        <h1 class="header text-center text-bold" style="color: navy">Đăng ký tài khoản</h1>
        <hr />
        <h3 class="header text-center text-bold" style="color: darkblue">Thông tin đăng nhập</h3>
        <div class="form-group">
            @Html.LabelFor(m => m.Email, new { @for = "Email", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
                @Html.ValidationMessageFor(u => u.Email)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.UserName, new { @for = "UserName", @class = "col-sm-4 control-label" })

            <div class="col-sm-8">
                @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
                @Html.ValidationMessageFor(u => u.UserName)
            </div>

        </div>

        <div class="form-group">
            @Html.LabelFor(m => m.Password, new { @for = "Password", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
                @Html.ValidationMessageFor(u => u.Password)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.ComfirmPassword, new { @for = "ComfirmPassword", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.PasswordFor(m => m.ComfirmPassword, new { @class = "form-control" })
                @Html.ValidationMessageFor(u => u.ComfirmPassword)
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-4 col-sm-8">
                <span class="field-validation-error">@ViewBag.ErrorMessage</span>
            </div>
        </div>
        <hr />
        <h3 class="header text-center text-bold" style="color: darkblue">Thông tin khách hàng</h3>
        <div class="form-group">
            @Html.LabelFor(m => m.FullName, new { @for = "FullName", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.TextBoxFor(m => m.FullName, new { @class = "form-control" })
                @Html.ValidationMessageFor(u => u.FullName)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.DayOfBirth, new { @for = "DayOfBirth", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.TextBoxFor(m => m.DayOfBirth, new { @class = "form-control" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.Gender, new { @for = "Gender", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.DropDownListFor(m => m.Gender, new SelectList(
                    new List<Object>{
                        new { value = 0 , text = "Nam"  },
                        new { value = 1 , text = "Nữ" },
                    }, "value", "text", 2), new { @class = "form-control" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.Telephone, new { @for = "Telephone", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.TextBoxFor(m => m.Telephone, new { @class = "form-control" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.Address, new { @for = "Address", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.TextBoxFor(m => m.Address, new { @class = "form-control" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.YahooAccount, new { @for = "YahooAccount", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.TextBoxFor(m => m.YahooAccount, new { @class = "form-control" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.SkypeAccount, new { @for = "SkypeAccount", @class = "col-sm-4 control-label" })
            <div class="col-sm-8">
                @Html.TextBoxFor(m => m.SkypeAccount, new { @class = "form-control" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Captcha, new { @for = "YahooAccount", @class = "col-sm-4 control-label" })
            <div class="col-sm-2">
                <img alt="Captcha" src="@Url.Action("CaptchaImage")" style="" />
            </div>
            <div class="col-sm-6">
                @Html.TextBoxFor(model => model.Captcha, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Captcha)
            </div>
        </div>
        <hr />
        <div class="form-group">
            <div class="col-sm-offset-4 col-sm-8">
                <button type="submit" class="btn btn-primary float-right">Đăng ký</button>
            </div>
        </div>
        </div>
        @Scripts.Render("~/Scripts/WMILK/cang.js")
}
